.class public abstract Lcom/esfile/screen/recorder/player/controller/a;
.super Landroid/widget/FrameLayout;
.source "BaseMediaController.java"


# instance fields
.field public a:Landroid/content/Context;

.field private b:Ljava/lang/StringBuilder;

.field private c:Ljava/util/Formatter;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    const/4 v0, 0x0

    .line 1
    invoke-direct {p0, p1, v0}, Lcom/esfile/screen/recorder/player/controller/a;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1

    const/4 v0, 0x0

    .line 2
    invoke-direct {p0, p1, p2, v0}, Lcom/esfile/screen/recorder/player/controller/a;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 0

    .line 3
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 4
    iput-object p1, p0, Lcom/esfile/screen/recorder/player/controller/a;->a:Landroid/content/Context;

    .line 5
    new-instance p1, Ljava/lang/StringBuilder;

    invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V

    iput-object p1, p0, Lcom/esfile/screen/recorder/player/controller/a;->b:Ljava/lang/StringBuilder;

    .line 6
    new-instance p1, Ljava/util/Formatter;

    iget-object p2, p0, Lcom/esfile/screen/recorder/player/controller/a;->b:Ljava/lang/StringBuilder;

    invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;

    move-result-object p3

    invoke-direct {p1, p2, p3}, Ljava/util/Formatter;-><init>(Ljava/lang/Appendable;Ljava/util/Locale;)V

    iput-object p1, p0, Lcom/esfile/screen/recorder/player/controller/a;->c:Ljava/util/Formatter;

    const/4 p1, 0x1

    .line 7
    invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->setFitsSystemWindows(Z)V

    return-void
.end method


# virtual methods
.method public a(I)Ljava/lang/String;
    .locals 9

    .line 7
    div-int/lit8 v0, p1, 0x64

    rem-int/lit8 v0, v0, 0xa

    .line 8
    div-int/lit16 p1, p1, 0x3e8

    .line 9
    rem-int/lit8 v1, p1, 0x3c

    .line 10
    div-int/lit8 v2, p1, 0x3c

    rem-int/lit8 v2, v2, 0x3c

    .line 11
    div-int/lit16 p1, p1, 0xe10

    .line 12
    iget-object v3, p0, Lcom/esfile/screen/recorder/player/controller/a;->b:Ljava/lang/StringBuilder;

    const/4 v4, 0x0

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->setLength(I)V

    .line 13
    invoke-virtual {p0}, Lcom/esfile/screen/recorder/player/controller/a;->a()Z

    move-result v3

    const/4 v5, 0x3

    const/4 v6, 0x1

    const/4 v7, 0x2

    if-eqz v3, :cond_1

    if-lez p1, :cond_0

    .line 14
    iget-object v3, p0, Lcom/esfile/screen/recorder/player/controller/a;->c:Ljava/util/Formatter;

    const/4 v8, 0x4

    new-array v8, v8, [Ljava/lang/Object;

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p1

    aput-object p1, v8, v4

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p1

    aput-object p1, v8, v6

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p1

    aput-object p1, v8, v7

    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p1

    aput-object p1, v8, v5

    const-string p1, "%d:%02d:%02d.%1d"

    invoke-virtual {v3, p1, v8}, Ljava/util/Formatter;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/util/Formatter;

    move-result-object p1

    invoke-virtual {p1}, Ljava/util/Formatter;->toString()Ljava/lang/String;

    move-result-object p1

    return-object p1

    .line 15
    :cond_0
    iget-object p1, p0, Lcom/esfile/screen/recorder/player/controller/a;->c:Ljava/util/Formatter;

    new-array v3, v5, [Ljava/lang/Object;

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    aput-object v2, v3, v4

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    aput-object v1, v3, v6

    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v0

    aput-object v0, v3, v7

    const-string v0, "%02d:%02d.%1d"

    invoke-virtual {p1, v0, v3}, Ljava/util/Formatter;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/util/Formatter;

    move-result-object p1

    invoke-virtual {p1}, Ljava/util/Formatter;->toString()Ljava/lang/String;

    move-result-object p1

    return-object p1

    :cond_1
    if-lez p1, :cond_2

    .line 16
    iget-object v0, p0, Lcom/esfile/screen/recorder/player/controller/a;->c:Ljava/util/Formatter;

    new-array v3, v5, [Ljava/lang/Object;

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p1

    aput-object p1, v3, v4

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p1

    aput-object p1, v3, v6

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p1

    aput-object p1, v3, v7

    const-string p1, "%d:%02d:%02d"

    invoke-virtual {v0, p1, v3}, Ljava/util/Formatter;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/util/Formatter;

    move-result-object p1

    invoke-virtual {p1}, Ljava/util/Formatter;->toString()Ljava/lang/String;

    move-result-object p1

    return-object p1

    .line 17
    :cond_2
    iget-object p1, p0, Lcom/esfile/screen/recorder/player/controller/a;->c:Ljava/util/Formatter;

    new-array v0, v7, [Ljava/lang/Object;

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    aput-object v2, v0, v4

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    aput-object v1, v0, v6

    const-string v1, "%02d:%02d"

    invoke-virtual {p1, v1, v0}, Ljava/util/Formatter;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/util/Formatter;

    move-result-object p1

    invoke-virtual {p1}, Ljava/util/Formatter;->toString()Ljava/lang/String;

    move-result-object p1

    return-object p1
.end method

.method public a(II)V
    .locals 1

    .line 3
    invoke-virtual {p0}, Lcom/esfile/screen/recorder/player/controller/a;->getTotalTimeTextView()Landroid/widget/TextView;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 4
    invoke-virtual {p0, p2}, Lcom/esfile/screen/recorder/player/controller/a;->a(I)Ljava/lang/String;

    move-result-object p2

    invoke-virtual {v0, p2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 5
    :cond_0
    invoke-virtual {p0}, Lcom/esfile/screen/recorder/player/controller/a;->getPlayTimeTextView()Landroid/widget/TextView;

    move-result-object p2

    if-eqz p2, :cond_1

    .line 6
    invoke-virtual {p0, p1}, Lcom/esfile/screen/recorder/player/controller/a;->a(I)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {p2, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :cond_1
    return-void
.end method

.method public a(III)V
    .locals 0

    if-gtz p2, :cond_0

    return-void

    :cond_0
    mul-int/lit8 p3, p3, 0xa

    .line 1
    invoke-virtual {p0, p1, p3}, Lcom/esfile/screen/recorder/player/controller/a;->b(II)V

    .line 2
    invoke-virtual {p0, p1, p2}, Lcom/esfile/screen/recorder/player/controller/a;->a(II)V

    return-void
.end method

.method protected abstract a()Z
.end method

.method public b(II)V
    .locals 1

    .line 1
    invoke-virtual {p0}, Lcom/esfile/screen/recorder/player/controller/a;->getProgressSeekBar()Landroid/widget/SeekBar;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {v0, p1}, Landroid/widget/SeekBar;->setProgress(I)V

    .line 3
    invoke-virtual {v0, p2}, Landroid/widget/SeekBar;->setSecondaryProgress(I)V

    :cond_0
    return-void
.end method

.method public getMax()I
    .locals 1

    .line 1
    invoke-virtual {p0}, Lcom/esfile/screen/recorder/player/controller/a;->getProgressSeekBar()Landroid/widget/SeekBar;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {v0}, Landroid/widget/SeekBar;->getMax()I

    move-result v0

    return v0

    :cond_0
    const/4 v0, -0x1

    return v0
.end method

.method protected abstract getPauseButton()Landroid/widget/ImageView;
.end method

.method protected abstract getPlayTimeTextView()Landroid/widget/TextView;
.end method

.method protected abstract getProgressSeekBar()Landroid/widget/SeekBar;
.end method

.method protected abstract getTotalTimeTextView()Landroid/widget/TextView;
.end method

.method public setMax(I)V
    .locals 1

    .line 1
    invoke-virtual {p0}, Lcom/esfile/screen/recorder/player/controller/a;->getProgressSeekBar()Landroid/widget/SeekBar;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {v0, p1}, Landroid/widget/SeekBar;->setMax(I)V

    :cond_0
    return-void
.end method

.method public setOnPauseClickListener(Landroid/view/View$OnClickListener;)V
    .locals 1

    .line 1
    invoke-virtual {p0}, Lcom/esfile/screen/recorder/player/controller/a;->getPauseButton()Landroid/widget/ImageView;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    :cond_0
    return-void
.end method

.method public setOnSeekBarChangeListener(Landroid/widget/SeekBar$OnSeekBarChangeListener;)V
    .locals 1

    .line 1
    invoke-virtual {p0}, Lcom/esfile/screen/recorder/player/controller/a;->getProgressSeekBar()Landroid/widget/SeekBar;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {v0, p1}, Landroid/widget/SeekBar;->setOnSeekBarChangeListener(Landroid/widget/SeekBar$OnSeekBarChangeListener;)V

    :cond_0
    return-void
.end method
